<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Insert title here</title>
		<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css">
	</head>
	<body>
		<nav class="navbar navbar-default navbar-static-top">
			<div class="container">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed"
						data-toggle="collapse" data-target="#navbar" aria-expanded="false"
						aria-controls="navbar">
						<span class="sr-only">Toggle navigation</span> <span
							class="icon-bar"></span> <span class="icon-bar"></span> <span
							class="icon-bar"></span>
					</button>
					<a class="navbar-brand" href="#">煤炭招聘网</a>
				</div>
				<div id="navbar" class="navbar-collapse collapse">
					<c:if test="${user == null}">
						<form class="navbar-form navbar-right" action="/recruit/sys/user?method=login" method="post">
							<div class="form-group">
								<input type="text" placeholder="账号" name="account" class="form-control">
							</div>
							<div class="form-group">
								<input type="password" placeholder="密码" name="password" class="form-control">
							</div>
							<button type="submit" class="btn btn-success">登录</button>
							<a class="btn btn-success" href="register.jsp">注册</a>
						</form>
					</c:if>
					<c:if test="${user != null}">
						<ul class="nav navbar-nav navbar-right">
							<li class="dropdown">
								<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
									${user.nickname}<span class="caret"></span>
								</a>
								<ul class="dropdown-menu">
									<li><a href="#">个人中心</a></li>
									<li><a href="#">简历中心</a></li>
									<li><a href="#">谁看过我</a></li>
									<li><a href="#">我的申请</a></li>
									<li role="separator" class="divider"></li>
									<li><a href="/recruit/sys/user?method=logout">退出登录</a></li>
								</ul>
							</li>
						</ul>
					</c:if>
				</div>
				<!--/.nav-collapse -->
			</div>
		</nav>
	
	
		<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
		<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
		<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" ></script>
	</body>
</html>